package random.fox.p2p.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.Button;
import android.widget.RelativeLayout;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
import flow.Flow;
import random.fox.p2p.Paths;
import random.fox.p2p.R;
import random.fox.p2p.pathview.IsMasterView;


/**
 * Created by wq on 15/3/13.
 */
public class SplashView extends RelativeLayout implements IsMasterView {

    @InjectView(R.id.btn_login)
    Button loginBtn;
    @InjectView(R.id.btn_register)
    Button registerBtn;

    public SplashView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void updateSelection() {

    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        ButterKnife.inject(this);
    }

    @OnClick(R.id.btn_login)
    void loginClicked() {
        Flow.get(getContext()).set(new Paths.LoginPath());
    }

    @OnClick(R.id.btn_register)
    void registerClicked() {
        Flow.get(getContext()).set(new Paths.RegisterPath());
    }
}
